import importlib


if __name__ == "__main__":

    # algorithm_name = 'Simultaneous_LP'
    algorithm_name = 'Group_LP'
    # algorithm_name = 'Group_LP_diffW'
    
    m_agrm = importlib.import_module(f'algorithm.{algorithm_name}')
    # print(m_agrm)
    # print(dir(m_agrm))
    Class_Agrm = getattr(m_agrm, algorithm_name)
    # print(Class_Agrm)
    conf_dict = {
        'DOWNLINK_IN_RACK': 8,
        "RACK_NUM": 8,
    }

    agrm_obj = Class_Agrm(**conf_dict)
    demands = 2
    uplink_in_rack = agrm_obj.calc_min_provision(demands)
    print(uplink_in_rack)
